<?php

namespace App\Vilidate\playlet;

/**
 * user控制器下的验证规则类
 */
class AppletCouponPromotionActivityController
{
    public $index = ['rule'=>[], 'msg'=>[]];


    public $delete = ['rule'=>[], 'msg'=>[]];

    public $create = [
        'rule'=>[
            'activity_name' => 'required|string|max:15',
            'applet_id' => 'required|integer',
            'applet_coupon_id' => 'required|integer',
            'action_trigger' => 'required|integer',
            'receive_limit' => 'required|integer|min:1|max:20',
            'high_value_content' => 'required|string|max:11',
            'recent_bubble_text' =>'required|string',
            'jump_text' =>'required|string',
            'short_title' =>'required|string|max:5',
            'valid_time' => 'required|array',
        ],
        'msg'=>[
            'valid_time.required' => '活动生效时间时间不能为空',
            'valid_time.array' => '活动生效时间时间应该为数组',
            'short_title.required' => '权益名称名称不能为空',
            'short_title.string' => '权益名称应为字符串',
            'short_title.max' => '权益名称不能超过5字',
            'jump_text.required' => '去使用按钮文案不能为空',
            'jump_text.string' => '去使用按钮文案应为字符串',
            'recent_bubble_text.required' => '红点气泡文案不能为空',
            'recent_bubble_text.string' => '红点气泡文案应为字符串',
            'activity_name.required' => '营销活动名称不能为空',
            'activity_name.string' => '营销活动名称应为字符串',
            'activity_name.max' => '营销活动名称不能超过15字',
            'receive_limit.required' => '领取小程序券的次数不能为空',
            'receive_limit.integer' => '领取小程序券的次数应该为整数',
            'receive_limit.min' => '用户领取小程序券的次数最少为1',
            'receive_limit.max' => '用户领取小程序券的次数最大为20',
            'high_value_content.required' => '引流文案不能为空',
            'high_value_content.string' => '引流文案应该为字符串',
            'high_value_content.max' => '引流文案字数不得超过11个字',
            'applet_id.required' => '小程序不能为空',
            'applet_coupon_id.required' => '小程序券不能为空',
            'action_trigger.required' => '券类型不能为空',
            'action_trigger.integer' => '券类型应该为整数'
        ]
    ];

    public $update = [
        'rule'=>[
            'applet_id' => 'required|integer',
            'applet_coupon_id' => 'required|integer',
            'activity_name' => 'required|string|max:15',
            'high_value_content' => 'required|string|max:11',
            'recent_bubble_text' =>'required|string',
            'jump_text' =>'required|string',
            'short_title' =>'required|string|max:5',
            'valid_time' => 'required|array',
        ],
        'msg'=>[
            'applet_id.required' => '小程序不能为空',
            'applet_coupon_id.required' => '小程序券不能为空',
            'valid_time.required' => '活动生效时间时间不能为空',
            'valid_time.array' => '活动生效时间时间应该为数组',
            'short_title.required' => '权益名称名称不能为空',
            'short_title.string' => '权益名称应为字符串',
            'short_title.max' => '权益名称不能超过5字',
            'jump_text.required' => '红点气泡文案不能为空',
            'jump_text.string' => '红点气泡文案应为字符串',
            'recent_bubble_text.required' => '去使用按钮文案不能为空',
            'recent_bubble_text.string' => '去使用按钮文案应为字符串',
            'activity_name.required' => '营销活动名称不能为空',
            'activity_name.string' => '营销活动名称应为字符串',
            'activity_name.max' => '营销活动名称不能超过15字',
            'high_value_content.required' => '引流文案不能为空',
            'high_value_content.string' => '引流文案应该为字符串',
            'high_value_content.max' => '引流文案字数不得超过11个字'
        ]
    ];

    public $updateStatus = [
        'rule'=>[
            'status' => 'required|integer',
        ],
        'msg'=>[
            'status.required' => '状态不能为空',
            'status.integer' => '状态应该为整数',
        ]
    ];
}